﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace f1messabox1
{
    public partial class Form1 : Form
    {
        public event changeHandler changeOrder;


        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            changeEventArgs changeEventArgs = new changeEventArgs();
            if (textBox1.Text != "")
                changeEventArgs.Id = Convert.ToInt32(textBox1.Text);
            else
                textBox1.Text = "输入订单号";
            if(textBox3.Text!="")
            changeEventArgs.OrderId = Convert.ToInt32(textBox3.Text);
            if (textBox6.Text != "")
                changeEventArgs.num[0]=Convert.ToInt32(textBox6.Text);
            if (textBox4.Text != "")
                changeEventArgs.num[1]=Convert.ToInt32(textBox4.Text);
            changeEventArgs.Str[0]=textBox2.Text;
            changeEventArgs.Str[1]=textBox5.Text;
            changeOrder(this,changeEventArgs);
        }
    }
    public delegate void changeHandler(object sender, changeEventArgs e);
    public class changeEventArgs
    {
        public int Id { get; set; }
        public int OrderId { get; set; }
        public string[] Str { get; set; }
        public int[] num { get; set; }
        public changeEventArgs()
        {
            Id = -1;
            OrderId = -1;
            Str = new string[2] {"",""};
            num = new int[2] {-1,-1};
        }
    }
}
